package io.gitee.loulan_yxq.owner.core.test.domain;

import io.gitee.loulan_yxq.owner.core.collection.ArrayTool;
import io.gitee.loulan_yxq.owner.core.stream.CollectorTool;
import io.gitee.loulan_yxq.owner.core.tool.StrTool;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Arrays;
import java.util.stream.Collectors;

/*********************************************************
 ** 用户对象
 ** <br><br>
 ** Date: Created in 2021/10/9  19:34
 ** @author 楼兰
 ** @version 0.0.0
 *********************************************************/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    private String name;
    private String username;
    private int age;
    private String sex;
    private String phone;

    private int testMethod(int a) {
        return a;
    }

    private String testMethod(Integer a,Integer b,Integer c) {
        Integer[] of = ArrayTool.of(a, b, c);
        return ArrayTool.stream(of).map(integer -> StrTool.valueOf(integer)).collect(CollectorTool.toStr(","));
    }

    public int testMethod() {
        return 12;
    }

    public int testMethod(int a,double b) {
        int i = (int) (a + b);
        return i;
    }

    private int testMethod(int a,int b) {
        return a+b;
    }
}
